#ifndef __DATA_FILE_H__
#define __DATA_FILE_H__

#include "comm/comm_base.h"
#include "comm/comm_dbg_log.h"
#include "pcpt_comm/pcpt_comm_file.h"

#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>

#define FRONT_UPPER_CAMERA_TOPIC     "/cameras/front_upper_camera"
#define FRONT_LOWER_CAMERA_TOPIC     "/cameras/front_lower_camera"
#define FRONT_LEFT_CAMERA_TOPIC      "/cameras/front_left_camera"
#define FRONT_RIGHT_CAMERA_TOPIC     "/cameras/front_right_camera"
#define REAR_CAMERA_TOPIC            "/cameras/rear_camera"
#define REAR_LEFT_CAMERA_TOPIC       "/cameras/rear_left_camera"
#define REAR_RIGHT_CAMERA_TOPIC      "/cameras/rear_right_camera"
#define TRAFFIC_LIGHT_CAMERA_TOPIC   "/cameras/traffic_light_camera"

using namespace std;

class DATA_FILE_C
{
public:
    DATA_FILE_C()
      : isPlyDirExist_(false),
        isDrcDirExist_(false)
    {
        //objFileMngEx_.GetCfgFileDir(strPrefixPath_);
        strPrefixPath_ = "/home/saite/";
        strPcdDir_ = strPrefixPath_ + "data_collect/lidar/pcd";
        strPlyDir_ = strPrefixPath_ + "data_collect/lidar/ply";
        strBinDir_ = strPrefixPath_ + "data_collect/lidar/bin";
        strDrcDir_ = strPrefixPath_ + "data_collect/lidar/drc";
        
        strFrontUpperCamDir_ = strPrefixPath_ + "data_collect" + FRONT_UPPER_CAMERA_TOPIC;
        strFrontLowerCamDir_ = strPrefixPath_ + "data_collect" + FRONT_LOWER_CAMERA_TOPIC;
        strFrontLeftCamDir_ = strPrefixPath_ + "data_collect" + FRONT_LEFT_CAMERA_TOPIC;
        strFrontRightCamDir_ = strPrefixPath_ + "data_collect" + FRONT_RIGHT_CAMERA_TOPIC;
        strRearCamDir_ = strPrefixPath_ + "data_collect" + REAR_CAMERA_TOPIC;
        strRearLeftCamDir_ = strPrefixPath_ + "data_collect" + REAR_LEFT_CAMERA_TOPIC;
        strRearRightCamDir_ = strPrefixPath_ + "data_collect" + REAR_RIGHT_CAMERA_TOPIC;
        strTrafficLightCamDir_ = strPrefixPath_ + "data_collect" + TRAFFIC_LIGHT_CAMERA_TOPIC;
    }
        
    ~DATA_FILE_C(){}

    string GetPcdDirPath();
    string GetPlyDirPath();
    string GetBinDirPath();
    string GetDrcDirPath();

    string GetFrontUpperCamDirPath();
    string GetFrontLowerCamDirPath();
    string GetFrontLeftCamDirPath();
    string GetFrontRightCamDirPath();
    string GetRearCamDirPath();
    string GetRearLeftCamDirPath();
    string GetRearRightCamDirPath();
    string GetTrafficLightCamDirPath();
    
    void   DeleteFile(const char* filePath);

private:
    FILE_MNG_EX_C   objFileMngEx_;

    bool            isPlyDirExist_;
    bool            isDrcDirExist_;
    
    string          strPrefixPath_;
    string          strPcdDir_;
    string          strPlyDir_;
    string          strBinDir_;
    string          strDrcDir_;

    string          strFrontUpperCamDir_;
    string          strFrontLowerCamDir_;
    string          strFrontLeftCamDir_;
    string          strFrontRightCamDir_;
    string          strRearCamDir_;
    string          strRearLeftCamDir_;
    string          strRearRightCamDir_;
    string          strTrafficLightCamDir_;
    
};

#endif